export default{
    data(){
        return {
        //设置默认的分享参数
            share:{
                title:'小新dev',
                path:'/pages/me/me',
                imageUrl:'',
                desc:'',
                content:''
            }
        }
    },
    onShareAppMessage(res) {
        return {
            title:this.share.title,
            path:this.share.path,
            imageUrl:this.share.imageUrl,
            desc:this.share.desc,
            content:this.share.content
        }
    },
	onShareTimeline(res) {
		return{
			title:this.share.title,
			query:'',
		}
	},
	onLoad() {
		uni.showShareMenu({  
		  withShareTicket: true,  
		  menus: ['shareAppMessage', 'shareTimeline']  
		})
		// 判断有没有登陆
		let token = this.$util.getLocal('token')
		console.log(token)
		if(token != ''){
			this.getData()
		}else{
			this.$store.dispatch('login').then(()=>{
				this.getData()
			}).catch()
		}
	},
	methods:{
		// 进入页面需要获取数据的接口
		getData(){}
	}
	
}